import { PageParam } from '@/services/common'
import { covertTableData } from '@/utils/tableUtil'
import { request } from '@umijs/max'
import { QrCodeUpdateDTO, QrCodeVO } from '../../types/qrCode'

export const gerQrCodePage = async (params: PageParam) => {
  let resp = await request<QrCodeVO[]>(`/api/qrCode/page`, { params })
  return covertTableData(resp)
}
export const createQrCode = async (data: QrCodeUpdateDTO) => {
  let resp = await request<QrCodeVO>(`/api/qrCode/createQrCode`, { method: 'POST', data })
  return resp
}
